From 1d5464775f0f9a3100ed2a351f66f7fdde83ef82 Mon Sep 17 00:00:00 2001 From: "smh22@tempest.cl.cam.ac.uk" Date: Thu, 5 May 2005 14:27:20 +0000 Subject: [PATCH] bitkeeper revision 1.1389.5.16 (427a2d48fB11IAeFlv0AL07RxME0vg) build privcmd even in unpriv domains; minor libxc fix Signed-off-by: Steven Hand --- BitKeeper/etc/ignore | 5 +++++ linux-2.6.11-xen-sparse/drivers/xen/Makefile | 2 +- tools/libxc/xc_domain.c | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore index 3f65adddad..419124272e 100644 --- a/BitKeeper/etc/ignore +++ b/BitKeeper/etc/ignore @@ -140,3 +140,8 @@ xen/tools/figlet/figlet xen/xen xen/xen-syms xen/xen.* +CRASH.txt +linux-2.4.29-xen-sparse/arch/xen/kernel/foo.ps +skiing-defaults2 +tools/libxc/xc_linux_restore.c.SMH +tools/libxc/xc_linux_save.c.SMH diff --git a/linux-2.6.11-xen-sparse/drivers/xen/Makefile b/linux-2.6.11-xen-sparse/drivers/xen/Makefile index 7bb4798309..50e13067a3 100644 --- a/linux-2.6.11-xen-sparse/drivers/xen/Makefile +++ b/linux-2.6.11-xen-sparse/drivers/xen/Makefile @@ -3,8 +3,8 @@ obj-y += console/ obj-y += evtchn/ obj-y += balloon/ +obj-y += privcmd/ -obj-$(CONFIG_XEN_PRIVILEGED_GUEST) += privcmd/ obj-$(CONFIG_XEN_BLKDEV_BACKEND) += blkback/ obj-$(CONFIG_XEN_NETDEV_BACKEND) += netback/ obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += blkfront/ diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index cb5ae76269..488139cfd1 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -103,6 +103,7 @@ int xc_domain_getinfo(int xc_handle, unsigned int nr_doms; u32 next_domid = first_domid; dom0_op_t op; + int rc = 0; for ( nr_doms = 0; nr_doms < max_doms; nr_doms++ ) { @@ -110,7 +111,7 @@ int xc_domain_getinfo(int xc_handle, op.u.getdomaininfo.domain = (domid_t)next_domid; op.u.getdomaininfo.exec_domain = 0; // FIX ME?!? op.u.getdomaininfo.ctxt = NULL; /* no exec context info, thanks. */ - if ( do_dom0_op(xc_handle, &op) < 0 ) + if ( (rc = do_dom0_op(xc_handle, &op)) < 0 ) break; info->domid = (u16)op.u.getdomaininfo.domain; @@ -137,6 +138,8 @@ int xc_domain_getinfo(int xc_handle, info++; } + if(!nr_doms) return rc; + return nr_doms; } -- 2.30.2